FROM tomcat:8.5-jdk8

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo 'Asia/Shanghai' >/etc/timezone \
    && dpkg-reconfigure -f noninteractive tzdata

ADD cas.war /usr/local/tomcat/webapps/

## 以下是/cas 添加 / 跳转到 /cas
RUN mkdir -p /usr/local/tomcat/webapps/ROOT/
ADD index.html /usr/local/tomcat/webapps/ROOT/

## 以下是配置根路径是 / 去掉 /cas
#RUN mv /usr/local/tomcat/webapps/cas.war /usr/local/tomcat/webapps/ROOT.war

EXPOSE 8080
ENTRYPOINT ["/usr/local/tomcat/bin/catalina.sh","run"]